<template>
    <el-row :gutter="0">
        <el-col v-for="(name, index) in iconNames" :key="index" :span="2" class="wrapper">
            <IconPlus :name="`ele-${name}`" :size="32"/>
            <span class="icon-name unselectable">{{ `ele-${name}` }}</span>
        </el-col>
    </el-row>
</template>

<script setup>
import * as ElementPlusIconsVue from '@element-plus/icons-vue';

// 获取所有图标名称
const iconNames = ref(Object.keys(ElementPlusIconsVue));
</script>

<style lang="scss" scoped>
.wrapper {
    text-align: center;
    border: 1px solid var(--el-border-color);
    padding: 25px;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    &:hover {
        color: var(--el-color-primary);
        box-shadow: var(--el-box-shadow);
    }



    .icon-name {
        display: block;
        margin-top: 8px;
        font-size: 14px;
        word-break: break-all;
        user-select: none;
        ;
    }

    .unselectable {
        -webkit-user-select: none;
        /* Safari */
        -moz-user-select: none;
        /* Firefox */
        -ms-user-select: none;
        /* Internet Explorer/Edge */
        user-select: none;
        /* 标准语法 */
    }
}
</style>